package string;

public class startswithDemo {
    public static void main(String[] args) {
        //boolean staetsWith(String s);
        //判断当前字符串是否以给定的字符串s开始的
        String str="thinking in java";
        boolean starts=str.startsWith("think");//判断以think开头
        System.out.println(starts);//ture
        boolean ends =str.endsWith(".png");//判断以 .png  结尾
        System.out.println(ends);//false

    }
}
